import 'package:flutter_fronter_service/generated/json/base/json_convert_content.dart';
import 'package:flutter_fronter_service/model/properties_entity.dart';

PropertiesEntity $PropertiesEntityFromJson(Map<String, dynamic> json) {
  final PropertiesEntity propertiesEntity = PropertiesEntity();
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    propertiesEntity.name = name;
  }
  final String? value = jsonConvert.convert<String>(json['value']);
  if (value != null) {
    propertiesEntity.value = value;
  }
  return propertiesEntity;
}

Map<String, dynamic> $PropertiesEntityToJson(PropertiesEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['name'] = entity.name;
  data['value'] = entity.value;
  return data;
}

extension PropertiesEntityExtension on PropertiesEntity {
  PropertiesEntity copyWith({
    String? name,
    String? value,
  }) {
    return PropertiesEntity()
      ..name = name ?? this.name
      ..value = value ?? this.value;
  }
}